{include file="header.tpl"}

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
    {include file="docs/left_panel.tpl"}
    </td>
    <td>

    <div class="main">

        <h2>Source for file <strong>{$file->name}</strong></h2>

        <div class="spacer" style="padding-bottom: 5px"></div>

        <div class="coverage-opt" style="float: right;">
            <a id="covhide" href="javascript: void(null);">Hide full coverage view</a>
            <a id="covview" href="javascript: void(null);">Show full coverage view</a>
        </div>
        <p>Documentation is available at <a href="#">{$file->name}</a></p>

        <div class="src-code">
            <ol>
            {foreach from=$lines item=line key=num}
            {assign var="nm" value=$num+1}
            {assign var="view_num" value=$num+1}
            {assign var="cov" value=$coverage[$nm]}
            <li class="{if $cov.status == 1} line-cover-gray{elseif $cov.status == 2} line-cover-red{elseif $cov.status == 3} line-cover-green{/if}">
                <div class="line-cover{if $cov.status == 1} line-cover-gray{elseif $cov.status == 2} line-cover-red{elseif $cov.status == 3} line-cover-green{/if}"></div>
                <a name="l{$view_num}"></a>
                <div class="src-line">{$line}</div>
                <div class="spacer"></div>
            </li>
            {/foreach}
            </ol>
        </div>

    </div>

    </td>
</tr>
</table>

{literal}
<script>
$(function() {
    $('#covview, #covhide').click(function() {
        $('.src-code').toggleClass('fullcover');
        $(this).parent().toggleClass('coverage-opt');
    } );
} );
</script>
{/literal}

{include file="footer.tpl"}